package whr.modules.interview.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import whr.modules.interview.dao.StationDao;
import whr.modules.interview.entity.StationEntity;
import whr.modules.interview.service.StationService;

import java.util.List;


@Service("stationService")
public class StationServiceImpl extends ServiceImpl<StationDao, StationEntity> implements StationService {

    @Autowired
    private StationDao stationDao;

    /*
     * 获取所有的招聘岗位的信息
     * */
    @Override
    public List<StationEntity> getStationList() {

        List<StationEntity> list = this.list();

        return list;
    }

    /*
    * 根据岗位code获取岗位名称
    * */
    @Override
    public String getStationName(String stationCode) {
        String stationName = stationDao.getStationName(stationCode);
        return stationName;
    }

    /*
    * 根据岗位名称获取岗位code
    * */
    @Override
    public String getStationCode(String stationName) {
        return stationDao.getStationCode(stationName);
    }
}